<%@ page import="com.sun.xml.internal.bind.v2.model.core.ID" %><%--
  Created by IntelliJ IDEA.
  User: 东方九夜
  Date: 2021/6/14
  Time: 15:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html  lang="en">
<head>
  <meta charset="UTF-8">
  <title>修改密码</title>
  <link rel="stylesheet" type="text/css" href="css/login.css"/>
  <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
  <script type="text/javascript">
    function judge(){
      var newpw = document.getElementById('NewPassword').value;
      var tnewpw = document.getElementById('TNewPassword').value;
      //alert(newpw + "   " + tnewpw);
      if(newpw === tnewpw){
        return true;
      }
      else{
        alert("新密码与确认新密码中的数据不一致");
        return false;
      }
    }
  </script>
</head>
<body>
<%
  String ID = request.getParameter("ID");
%>
<div class="row" style="margin-top:80px">
  <div class="col-md-4"></div>
  <div class="col-md-4">
    <form method="post" action="AlterPasswordServlet" onsubmit="return judge()">
      <input type="hidden" class="form-control"  name="ID" value="<%=ID%>">
      <div class="form-group">
        <label for="OldPassword">原密码</label>
        <input type="password" class="form-control" id="OldPassword" name="OldPassword">
      </div>
      <div class="form-group">
        <label for="NewPassword">新密码</label>
        <input type="password" class="form-control" id="NewPassword" name="NewPassword">
      </div>
      <div class="form-group">
        <label for="TNewPassword">确认新密码</label>
        <input type="password" class="form-control" id="TNewPassword" name="TNewPassword">
      </div>
      <label class="radio-inline">
        <input type="radio" name="Type" id="inlineRadio3" value="student" checked>学生
      </label>
      <label class="radio-inline">
        <input type="radio" name="Type" id="inlineRadio2" value="teacher">教师
      </label>
      <label class="radio-inline">
        <input type="radio" name="Type" id="inlineRadio1" value="admin">管理员
      </label>
      <br/><br/>
      <button type="submit" class="btn btn-default">提交</button>
    </form>
  </div>
</div>
<div></div>
</body>
</html>
